package cn.jiyun.service.impl;


import cn.jiyun.mapper.StageMapper;
import cn.jiyun.pojo.Stage;
import cn.jiyun.result.QueryPageBean;
import cn.jiyun.service.StageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class StageServiceimpl implements StageService {

    @Autowired
    private StageMapper stageMapper;

    @Override
    public List<Map> findPage(QueryPageBean queryPageBean) {
        List<Map> list=stageMapper.findPage((queryPageBean.getCurrentPage()-1)*queryPageBean.getPageSize(),queryPageBean.getPageSize(),queryPageBean.getQueryString());
        return list;
    }

    @Override
    public int delete(Integer sid) {
        return stageMapper.delete(sid);
    }

    @Override
    public int add(Stage stage) {
        return stageMapper.add(stage);
    }

    @Override
    public int edit(Stage stage) {
        return stageMapper.edit(stage);
    }

    @Override
    public List<Stage> findById(Integer sid) {
        return stageMapper.findById(sid);
    }

   /* @Override
    public int jilu() {
        return stageMapper.jilu();
    }*/
}
